import math
import random
print('--------------二分法--------------------')
min = int(input('输入第一个数'))
max = int(input('输入第二个数'))
range = random.randint(min,max)
print(range)
i = 0
while True :
    current = int(min+max)//2
    i+=1
    print(f'本次数字{current}运算次数{i}')
    if range > current :
        min = current
        continue
    elif range< current :
        max = current
        continue
    else:
        print(f'完成结果是{range}')
        break



